package com.csair.youth.dao.impl.hibernate3;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.csair.youth.database.SysConfig;

/**
 * Impl:auto created by daobuilder1.1.1 
 * @version 1.0
 * @author daobuilder@csair.com
 */
public class SysConfigDaoImpl extends com.csair.youth.dao.impl.hibernate3.base.SysConfigDaoImplBase{
	private static final String GET_SYSCONFIG_BY_KEY_HQL = "from "+SysConfig.REF+" a where a."+SysConfig.PROP_CONFIG_KEY+"=:key";
	
	public SysConfig getSysConfigByKey(String key){
		Map param = new HashMap();
		param.put("key", key);
		List list = this.getGenericDao().find(GET_SYSCONFIG_BY_KEY_HQL, param, null);
		if(list == null || list.size() == 0){
			return null;
		}
		return (SysConfig)list.get(0);
	}
}